package com.demo.system.controller;

import com.demo.common.entity.ChatRoom;
import com.demo.common.response.Result;
import com.demo.system.service.ChatRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 聊天室表(ChatRoom)控制器
 *
 * @author why
 * @since 2025-09-23 10:12:42
 */
@RestController
@RequestMapping("/chat_room")
@CrossOrigin
public class ChatRoomController {

    @Autowired
    private ChatRoomService chatRoomService;

    @GetMapping
    public Result<?> findAll() {
        return Result.success(chatRoomService.list());
    }


}
